package shuogg.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

// 强调: 拦截器只是拦截.do, 也即action, 静态资源是不会去拦截的

//http://127.0.0.1:8080/springMVC_test_interceptor/interceptTest1/test.do

/*
执行结果:
        preHandle1
        preHandle2
                   谢谢放行!
        postHandle2
        postHandle1
        afterCompletion2
        afterCompletion1
*/
@Controller
@RequestMapping("/interceptTest1")
public class MyController1 {
    @RequestMapping("/test")
    public String Test() {
        System.out.println("谢谢放行!");
        return "test1";
    }
}
